//package com.jliang.apps.topic;
//
//import org.springframework.amqp.rabbit.annotation.Exchange;
//import org.springframework.amqp.rabbit.annotation.Queue;
//import org.springframework.amqp.rabbit.annotation.QueueBinding;
//import org.springframework.amqp.rabbit.annotation.RabbitHandler;
//import org.springframework.amqp.rabbit.annotation.RabbitListener;
//import org.springframework.amqp.support.AmqpHeaders;
//import org.springframework.beans.factory.annotation.Value;
//import org.springframework.messaging.Message;
//import org.springframework.stereotype.Component;
//
//import com.rabbitmq.client.Channel;
//
//import lombok.extern.slf4j.Slf4j;
//
//@Component
//@Slf4j
//public class TopicReceiver2 {
//	
//	@Value("${ssp.queue2}")
//	private String queueName;
//	
//	@RabbitListener(
//            bindings = @QueueBinding(value = @Queue(value = "${ssp.queue2}", durable = "true"),
//                    exchange = @Exchange(value = "sspTopicExchange", durable = "true", type = "topic", ignoreDeclarationExceptions = "true"), key = "ssp.console.topic.routekey")
//    )
//    @RabbitHandler
//    public void onMessage(Message message, Channel channel) throws Exception {
//        log.info(queueName+"--消费端Payload2: " + message.getPayload());
//        Long deliveryTag = (Long) message.getHeaders().get(AmqpHeaders.DELIVERY_TAG);
//        System.out.println("Topic Receiver2  : " + message.getPayload());
//        log.info("deliveryTag2: " + deliveryTag);
//        channel.basicAck(deliveryTag, false);
//    }
//
//}
